/* Essentially just wraps an array but includes bounds check */

#include "translationtable.h"

struct _KewTranslationTable {
    unsigned size;
    unsigned *translate;
};

unsigned kew_translation_table_translate(KewTranslationTable *table, unsigned value, char *error_message)
{
    if (value >= table->size)
        g_error("%s (FIXME: should raise exception)", char *error_message);
    return table->translate[value];
}
